type: object
properties:
  type:
    description: 'the type of the resource'
    type: string
    enum:
      - MeshProxyPatch
  mesh:
    description: 'Mesh is the name of the Kuma mesh this resource belongs to. It may be omitted for cluster-scoped resources.'
    type: string
    default: default
  name:
    description: 'Name of the Kuma resource'
    type: string
  spec:
    description: Spec is the specification of the Kuma MeshProxyPatch resource.
    properties:
      default:
        description: |-
          Default is a configuration specific to the group of destinations
          referenced in 'targetRef'.
        properties:
          appendModifications:
            description: AppendModifications is a list of modifications applied on the selected proxy.
            items:
              properties:
                cluster:
                  description: Cluster is a modification of Envoy's Cluster resource.
                  properties:
                    jsonPatches:
                      description: |-
                        JsonPatches specifies list of jsonpatches to apply to on Envoy's Cluster
                        resource
                      items:
                        description: JsonPatchBlock is one json patch operation block.
                        properties:
                          from:
                            description: From is a jsonpatch from string, used by move and copy operations.
                            type: string
                          op:
                            description: Op is a jsonpatch operation string.
                            enum:
                              - add
                              - remove
                              - replace
                              - move
                              - copy
                            type: string
                          path:
                            description: Path is a jsonpatch path string.
                            type: string
                          value:
                            description: Value must be a valid json value used by replace and add operations.
                            x-kubernetes-preserve-unknown-fields: true
                        required:
                          - op
                          - path
                        type: object
                      type: array
                    match:
                      description: Match is a set of conditions that have to be matched for modification operation to happen.
                      properties:
                        name:
                          description: Name of the cluster to match.
                          type: string
                        origin:
                          description: |-
                            Origin is the name of the component or plugin that generated the resource.


                            Here is the list of well-known origins:
                            inbound - resources generated for handling incoming traffic.
                            outbound - resources generated for handling outgoing traffic.
                            transparent - resources generated for transparent proxy functionality.
                            prometheus - resources generated when Prometheus metrics are enabled.
                            direct-access - resources generated for Direct Access functionality.
                            ingress - resources generated for Zone Ingress.
                            egress - resources generated for Zone Egress.
                            gateway - resources generated for MeshGateway.


                            The list is not complete, because policy plugins can introduce new resources.
                            For example MeshTrace plugin can create Cluster with "mesh-trace" origin.
                          type: string
                      type: object
                    operation:
                      description: Operation to execute on matched cluster.
                      enum:
                        - Add
                        - Remove
                        - Patch
                      type: string
                    value:
                      description: Value of xDS resource in YAML format to add or patch.
                      type: string
                  required:
                    - operation
                  type: object
                httpFilter:
                  description: |-
                    HTTPFilter is a modification of Envoy HTTP Filter
                    available in HTTP Connection Manager in a Listener resource.
                  properties:
                    jsonPatches:
                      description: |-
                        JsonPatches specifies list of jsonpatches to apply to on Envoy's
                        HTTP Filter available in HTTP Connection Manager in a Listener resource.
                      items:
                        description: JsonPatchBlock is one json patch operation block.
                        properties:
                          from:
                            description: From is a jsonpatch from string, used by move and copy operations.
                            type: string
                          op:
                            description: Op is a jsonpatch operation string.
                            enum:
                              - add
                              - remove
                              - replace
                              - move
                              - copy
                            type: string
                          path:
                            description: Path is a jsonpatch path string.
                            type: string
                          value:
                            description: Value must be a valid json value used by replace and add operations.
                            x-kubernetes-preserve-unknown-fields: true
                        required:
                          - op
                          - path
                        type: object
                      type: array
                    match:
                      description: Match is a set of conditions that have to be matched for modification operation to happen.
                      properties:
                        listenerName:
                          description: Name of the listener to match.
                          type: string
                        listenerTags:
                          additionalProperties:
                            type: string
                          description: Listener tags available in Listener#Metadata#FilterMetadata[io.kuma.tags]
                          type: object
                        name:
                          description: Name of the HTTP filter. For example "envoy.filters.http.local_ratelimit"
                          type: string
                        origin:
                          description: |-
                            Origin is the name of the component or plugin that generated the resource.


                            Here is the list of well-known origins:
                            inbound - resources generated for handling incoming traffic.
                            outbound - resources generated for handling outgoing traffic.
                            transparent - resources generated for transparent proxy functionality.
                            prometheus - resources generated when Prometheus metrics are enabled.
                            direct-access - resources generated for Direct Access functionality.
                            ingress - resources generated for Zone Ingress.
                            egress - resources generated for Zone Egress.
                            gateway - resources generated for MeshGateway.


                            The list is not complete, because policy plugins can introduce new resources.
                            For example MeshTrace plugin can create Cluster with "mesh-trace" origin.
                          type: string
                      type: object
                    operation:
                      description: Operation to execute on matched listener.
                      enum:
                        - Remove
                        - Patch
                        - AddFirst
                        - AddBefore
                        - AddAfter
                        - AddLast
                      type: string
                    value:
                      description: Value of xDS resource in YAML format to add or patch.
                      type: string
                  required:
                    - operation
                  type: object
                listener:
                  description: Listener is a modification of Envoy's Listener resource.
                  properties:
                    jsonPatches:
                      description: |-
                        JsonPatches specifies list of jsonpatches to apply to on Envoy's Listener
                        resource
                      items:
                        description: JsonPatchBlock is one json patch operation block.
                        properties:
                          from:
                            description: From is a jsonpatch from string, used by move and copy operations.
                            type: string
                          op:
                            description: Op is a jsonpatch operation string.
                            enum:
                              - add
                              - remove
                              - replace
                              - move
                              - copy
                            type: string
                          path:
                            description: Path is a jsonpatch path string.
                            type: string
                          value:
                            description: Value must be a valid json value used by replace and add operations.
                            x-kubernetes-preserve-unknown-fields: true
                        required:
                          - op
                          - path
                        type: object
                      type: array
                    match:
                      description: Match is a set of conditions that have to be matched for modification operation to happen.
                      properties:
                        name:
                          description: Name of the listener to match.
                          type: string
                        origin:
                          description: |-
                            Origin is the name of the component or plugin that generated the resource.


                            Here is the list of well-known origins:
                            inbound - resources generated for handling incoming traffic.
                            outbound - resources generated for handling outgoing traffic.
                            transparent - resources generated for transparent proxy functionality.
                            prometheus - resources generated when Prometheus metrics are enabled.
                            direct-access - resources generated for Direct Access functionality.
                            ingress - resources generated for Zone Ingress.
                            egress - resources generated for Zone Egress.
                            gateway - resources generated for MeshGateway.


                            The list is not complete, because policy plugins can introduce new resources.
                            For example MeshTrace plugin can create Cluster with "mesh-trace" origin.
                          type: string
                        tags:
                          additionalProperties:
                            type: string
                          description: Tags available in Listener#Metadata#FilterMetadata[io.kuma.tags]
                          type: object
                      type: object
                    operation:
                      description: Operation to execute on matched listener.
                      enum:
                        - Add
                        - Remove
                        - Patch
                      type: string
                    value:
                      description: Value of xDS resource in YAML format to add or patch.
                      type: string
                  required:
                    - operation
                  type: object
                networkFilter:
                  description: NetworkFilter is a modification of Envoy Listener's filter.
                  properties:
                    jsonPatches:
                      description: |-
                        JsonPatches specifies list of jsonpatches to apply to on Envoy Listener's
                        filter.
                      items:
                        description: JsonPatchBlock is one json patch operation block.
                        properties:
                          from:
                            description: From is a jsonpatch from string, used by move and copy operations.
                            type: string
                          op:
                            description: Op is a jsonpatch operation string.
                            enum:
                              - add
                              - remove
                              - replace
                              - move
                              - copy
                            type: string
                          path:
                            description: Path is a jsonpatch path string.
                            type: string
                          value:
                            description: Value must be a valid json value used by replace and add operations.
                            x-kubernetes-preserve-unknown-fields: true
                        required:
                          - op
                          - path
                        type: object
                      type: array
                    match:
                      description: Match is a set of conditions that have to be matched for modification operation to happen.
                      properties:
                        listenerName:
                          description: Name of the listener to match.
                          type: string
                        listenerTags:
                          additionalProperties:
                            type: string
                          description: Listener tags available in Listener#Metadata#FilterMetadata[io.kuma.tags]
                          type: object
                        name:
                          description: Name of the network filter. For example "envoy.filters.network.ratelimit"
                          type: string
                        origin:
                          description: |-
                            Origin is the name of the component or plugin that generated the resource.


                            Here is the list of well-known origins:
                            inbound - resources generated for handling incoming traffic.
                            outbound - resources generated for handling outgoing traffic.
                            transparent - resources generated for transparent proxy functionality.
                            prometheus - resources generated when Prometheus metrics are enabled.
                            direct-access - resources generated for Direct Access functionality.
                            ingress - resources generated for Zone Ingress.
                            egress - resources generated for Zone Egress.
                            gateway - resources generated for MeshGateway.


                            The list is not complete, because policy plugins can introduce new resources.
                            For example MeshTrace plugin can create Cluster with "mesh-trace" origin.
                          type: string
                      type: object
                    operation:
                      description: Operation to execute on matched listener.
                      enum:
                        - Remove
                        - Patch
                        - AddFirst
                        - AddBefore
                        - AddAfter
                        - AddLast
                      type: string
                    value:
                      description: Value of xDS resource in YAML format to add or patch.
                      type: string
                  required:
                    - operation
                  type: object
                virtualHost:
                  description: |-
                    VirtualHost is a modification of Envoy's VirtualHost
                    referenced in HTTP Connection Manager in a Listener resource.
                  properties:
                    jsonPatches:
                      description: |-
                        JsonPatches specifies list of jsonpatches to apply to on Envoy's
                        VirtualHost resource
                      items:
                        description: JsonPatchBlock is one json patch operation block.
                        properties:
                          from:
                            description: From is a jsonpatch from string, used by move and copy operations.
                            type: string
                          op:
                            description: Op is a jsonpatch operation string.
                            enum:
                              - add
                              - remove
                              - replace
                              - move
                              - copy
                            type: string
                          path:
                            description: Path is a jsonpatch path string.
                            type: string
                          value:
                            description: Value must be a valid json value used by replace and add operations.
                            x-kubernetes-preserve-unknown-fields: true
                        required:
                          - op
                          - path
                        type: object
                      type: array
                    match:
                      description: Match is a set of conditions that have to be matched for modification operation to happen.
                      properties:
                        name:
                          description: Name of the VirtualHost to match.
                          type: string
                        origin:
                          description: |-
                            Origin is the name of the component or plugin that generated the resource.


                            Here is the list of well-known origins:
                            inbound - resources generated for handling incoming traffic.
                            outbound - resources generated for handling outgoing traffic.
                            transparent - resources generated for transparent proxy functionality.
                            prometheus - resources generated when Prometheus metrics are enabled.
                            direct-access - resources generated for Direct Access functionality.
                            ingress - resources generated for Zone Ingress.
                            egress - resources generated for Zone Egress.
                            gateway - resources generated for MeshGateway.


                            The list is not complete, because policy plugins can introduce new resources.
                            For example MeshTrace plugin can create Cluster with "mesh-trace" origin.
                          type: string
                        routeConfigurationName:
                          description: Name of the RouteConfiguration resource to match.
                          type: string
                      type: object
                    operation:
                      description: Operation to execute on matched listener.
                      enum:
                        - Add
                        - Remove
                        - Patch
                      type: string
                    value:
                      description: Value of xDS resource in YAML format to add or patch.
                      type: string
                  required:
                    - match
                    - operation
                  type: object
              type: object
            type: array
        required:
          - appendModifications
        type: object
      targetRef:
        description: |-
          TargetRef is a reference to the resource the policy takes an effect on.
          The resource could be either a real store object or virtual resource
          defined inplace.
        properties:
          kind:
            description: Kind of the referenced resource
            enum:
              - Mesh
              - MeshSubset
              - MeshGateway
              - MeshService
              - MeshServiceSubset
              - MeshHTTPRoute
            type: string
          mesh:
            description: Mesh is reserved for future use to identify cross mesh resources.
            type: string
          name:
            description: |-
              Name of the referenced resource. Can only be used with kinds: `MeshService`,
              `MeshServiceSubset` and `MeshGatewayRoute`
            type: string
          proxyTypes:
            description: |-
              ProxyTypes specifies the data plane types that are subject to the policy. When not specified,
              all data plane types are targeted by the policy.
            items:
              enum:
                - Sidecar
                - Gateway
              type: string
            minItems: 1
            type: array
          tags:
            additionalProperties:
              type: string
            description: |-
              Tags used to select a subset of proxies by tags. Can only be used with kinds
              `MeshSubset` and `MeshServiceSubset`
            type: object
        type: object
    required:
      - default
      - targetRef
    type: object
